// The following ifdef block is the standard way of creating macros which make exporting 
// from a DLL simpler. All files within this DLL are compiled with the PHP_ACEAUTH_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see 
// PHP_ACEAUTH_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
#ifdef PHP_ACEAUTH_EXPORTS
#define PHP_ACEAUTH_API __declspec(dllexport)
#else
#define PHP_ACEAUTH_API __declspec(dllimport)
#endif

#define PHP_ACEAUTH_EXTNAME "aceauth"
#define PHP_ACEAUTH_EXTVER	"1.0"

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif 

extern "C" {
  #include "php.h"
  #include "php_ini.h"
  #include "php_globals.h"
  #include "ext/standard/info.h"
}

#ifdef ZTS
# include "TSRM.h"
#endif

ZEND_BEGIN_MODULE_GLOBALS(aceauth)
  char *provider_type;
  char *opt_acf_path;
ZEND_END_MODULE_GLOBALS(aceauth)

#ifdef ZTS
# define CFG(v) TSRMG(aceauth_globals_id, zend_aceauth_globals *, v)
#else
# define CFG(v) (aceauth_globals.v)
#endif

#ifdef ZTS
# define MCG(v) TSRMG(aceauth_globals_id, zend_aceauth_globals *, v)
#else
# define MCG(v) (aceauth_globals.v)
#endif


extern zend_module_entry aceauth_module_entry;
#define phpext_aceauth_ptr &aceauth_module_entry;